import os

def createMl(name, password):
    os.popen("ldapmanager/apps/core/utility/projects newlist %s %s" %(name, password)).read()
    #os.popen("newlist -q %s admin@localnet.org %s" %(name, password)).read()
    
def delMl(name):
    #os.popen("rmlist "+name).read()
    os.popen("ldapmanager/apps/core/utility/projects dellist %s" %name).read()
    
def addUser(user, list):
    #os.popen("echo %s|add_members -r - %s" %(user, list)).read()
    os.popen("ldapmanager/apps/core/utility/proanduser addusertoml %s %s" %(list, user)).read()
    
def delUser(user, list):
    #os.popen("echo %s|remove_members -f - %s" %(user, list)).read()
    os.popen("ldapmanager/apps/core/utility/proanduser deluserfromml %s %s" %(list, user)).read()
     
